/*
 * avrio.h
 *
 *  Created on: 2012/1/20
 *      Author: kc.chang
 */

#ifndef AVRIO_H_
#define AVRIO_H_

#define 	_BV(bit)   (1 << (bit))

extern unsigned char DDRD;
extern unsigned char PORTD;
extern unsigned char PIND;
extern unsigned char PD0;
extern unsigned char PD1;
extern unsigned char PD2;
extern unsigned char PD3;
extern unsigned char PD4;
extern unsigned char PD5;
extern unsigned char PD6;
extern unsigned char PD7;

extern unsigned char DDRC;
extern unsigned char PORTC;
extern unsigned char PINC;
extern unsigned char PC0;
extern unsigned char PC1;
extern unsigned char PC2;
extern unsigned char PC3;
extern unsigned char PC4;
extern unsigned char PC5;
extern unsigned char PC6;
extern unsigned char PC7;

extern unsigned char DDRB;
extern unsigned char PORTB;
extern unsigned char PINB;
extern unsigned char PB0;
extern unsigned char PB1;
extern unsigned char PB2;
extern unsigned char PB3;
extern unsigned char PB4;
extern unsigned char PB5;
extern unsigned char PB6;
extern unsigned char PB7;

extern unsigned char OSCCAL;

extern unsigned char TCCR0;
extern unsigned char TCNT0;
extern unsigned char TIFR;
extern unsigned char TIMSK;
extern unsigned char CS02;
extern unsigned char CS01;
extern unsigned char CS00;
extern unsigned char TOV0;
extern unsigned char TOIE0;

void _delay_loop_2(int i);
void PortD_Out(unsigned char x);

#endif /* AVRIO_H_ */
